package com.szh.cloud.role.service;

import com.szh.cloud.mybatis.entity.PtRoleEntity;
import com.szh.cloud.mybatis.flexigrid.FlexResEntity;
import com.szh.cloud.mybatis.flexigrid.PagingBean;
import com.szh.cloud.mybatis.ztree.ZtreeEntity;
import com.szh.cloud.role.entity.SearchRoleEntity;
import com.szh.cloud.role.exception.RoleNameCcupdException;

import java.util.List;

public interface RoleService {
    /**
     * 分页查询角色列表
     * @param entity
     * @param paging
     * @return
     */
    FlexResEntity<PtRoleEntity> queryRoleListByPage(SearchRoleEntity entity, PagingBean paging);

    /**
     * 查询菜单ztree列表
     * @param roleUuid
     * @return
     */
    List<ZtreeEntity> queryMenuByRoleId(String roleUuid);
    /**
     * 保存角色和菜单对应
     * @param roleUuids
     * @param menuIds
     */
    void saveMenuRefRole(String roleUuids, String menuIds);
    /**
     * 增加角色
     * @param entity
     */
    void addRoleInfo(PtRoleEntity entity);

    /**
     * 修改角色
     * @param entity
     */
    void modifyRoleInfo(PtRoleEntity entity);
    /**
     * 删除角色
     * @param roleUuids
     */
    void deleteRoleById(String roleUuids) throws RoleNameCcupdException;
}